package com.woniu.internalcommon.remote;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.internalcommon.dto.PassengerUser;
import com.woniu.internalcommon.dto.ResponseResult;
import com.woniu.internalcommon.dto.VerificationCodeDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "service-passenger-user",path = "service-passenger-user")
public interface ServicePassengerUserClient {

    @RequestMapping(method = RequestMethod.POST, value = "/user")
    public ResponseResult loginOrRegister(@RequestBody VerificationCodeDTO verificationCodeDTO);

    @RequestMapping(method = RequestMethod.GET, value = "/user/{phone}")
    public ResponseResult<PassengerUser> getUserByPhone(@PathVariable("phone") String phone);


    @RequestMapping(method = RequestMethod.GET, value = "/selectAll")
    public ResponseResult<Page<PassengerUser>> selectAll(@RequestParam("current") Integer  current, @RequestParam("size") Integer size );
    @RequestMapping(method = RequestMethod.POST, value = "/passenger/register")
    public ResponseResult registerPassenger(@RequestParam("passengerName") String passengerName, @RequestParam("passengerPhone")String passengerPhone, @RequestParam("passengerGender")Byte passengerGender);
//    @RequestMapping(method = RequestMethod.POST, value = "/passenger/register")
//    public ResponseResult registerPassenger(String passengerName, String passengerPhone, Byte passengerGender);
}

